#include <jailhouse/types.h>
#include <jailhouse/cell-config.h>
struct {
	struct jailhouse_system header;
	__u64 cpus[1];
	struct jailhouse_memory mem_regions[4];
	struct jailhouse_irqchip irqchips[1];
	struct jailhouse_pci_device pci_devices[0];
	struct jailhouse_pci_capability pci_caps[0];
} __attribute__((packed)) config = {
.header = {
	.signature = JAILHOUSE_SYSTEM_SIGNATURE,
	.revision = JAILHOUSE_CONFIG_REVISION,
	.flags = JAILHOUSE_SYS_VIRTUAL_DEBUG_CONSOLE,
	.hypervisor_memory = {
		.phys_start = 0x2104000000,
		.size = 0x1000000,
	},
	.debug_console = {
		.address = 0x28001000, 
		.size = 0x1000, 
		.type = JAILHOUSE_CON_TYPE_PL011, 
		.flags = JAILHOUSE_CON_ACCESS_MMIO|JAILHOUSE_CON_REGDIST_4,
	},
	.platform_info = {
		.pci_mmconfig_base = 0x0000000040000000, 
		.pci_mmconfig_end_bus = 0xFF, 
		.pci_is_virtual = 1, 
		.pci_domain = 1,
		.arm = {
			.gic_version = 3,
			.gicd_base = 0x0000000029A00000,
			.gicr_base = 0x0000000029B00000,
			.gicc_base = 0x0000000029C00000,
			.gich_base = 0x0000000029C10000,
			.gicv_base = 0x0000000029C20000,
			.maintenance_irq = 25,
		},
	},
	.root_cell = {
		.name = "RootCell",
		.cpu_set_size = sizeof(config.cpus),
		.num_memory_regions = ARRAY_SIZE(config.mem_regions),
		.num_irqchips = ARRAY_SIZE(config.irqchips),
		.num_pci_devices = ARRAY_SIZE(config.pci_devices),
		.num_pci_caps = ARRAY_SIZE(config.pci_caps),
		.vpci_irq_base = 100,
	},
},
.cpus = { 0xff, },
.mem_regions = {
	{.phys_start=0x28000000, .virt_start=0x28000000, .size=0x58000000, .flags=JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_IO},
	{.phys_start=0x80000000, .virt_start=0x80000000, .size=0x7c000000, .flags=JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_EXECUTE},
	{.phys_start=0x1000000000, .virt_start=0x1000000000, .size=0x1000000000, .flags=JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_IO},
	{.phys_start=0x2000000000, .virt_start=0x2000000000, .size=0x180000000, .flags=JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_EXECUTE},
},
.irqchips = {
	{
		.address = 0x0000000029A00000, 
		.pin_base = 32, 
		.pin_bitmap = {0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff}, 
	},
},
.pci_devices = {

},
.pci_caps = {

},
};
